package org.xserver.component.core;

import org.jboss.netty.handler.codec.http.HttpMethod;
import org.jboss.netty.handler.codec.http.HttpVersion;
import org.xserver.component.core.http.NettyHttpRequest;

/**
 * Wrap HttpRequest, Cookie provider <code>getParamterXXX</code> and
 * <code>getParameterXXXByPost</code> method to gain request parameter(s)
 * 
 * @author idoldefine
 * @since 2013/01/10
 * 
 */
public class XServerHttpRequest extends NettyHttpRequest {

	/**
	 * if xserver use ngix proxy or other loadbalance server get Original ip
	 * from httpHeader(X-Forwarded-For) else is remoteAddress
	 * */
	private String clientAddress;

	public XServerHttpRequest(HttpVersion httpVersion, HttpMethod method,
			String uri) {
		super(httpVersion, method, uri);
	}

	public String getClientAddress() {
		return clientAddress;
	}

	public void setClientAddress(String clientAddress) {
		this.clientAddress = clientAddress;
	}

}
